/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#include "WorldManager.h"
#include "GameWorld.h"

namespace PQGame
{
	WorldManager::WorldManager(void)
	{
	}

	WorldManager::~WorldManager(void)
	{
	}

	WorldManager &WorldManager::getSingleton()
	{
		static WorldManager sys;
		return sys;
	}

	void WorldManager::init(PQEngine::SceneObject* sceneObject)
	{
		_sceneObject=sceneObject;
	}

	void WorldManager::enterWorld(WorldType type)
	{
		currentWorld=type;
		switch(type){
			case MAIN_WORLD:
			default:
				SGameWorld.init(_sceneObject);
				break;
		}
	}

	void WorldManager::update(float deltaT)
	{
		switch(currentWorld){
			case MAIN_WORLD:
			default:
				SGameWorld.update(deltaT);
				break;
		}
	}
}
